package cn.jeeweb.web.modules.equipment.entity;


import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.flag.ObjectMark;
import cn.jeeweb.common.mvc.entity.DataEntity;
import cn.jeeweb.web.modules.sys.entity.Organization;
import cn.jeeweb.web.modules.sys.entity.User;
import cn.xjzn.framework_Core.ControlType;
import cn.xjzn.framework_Core.DataType;
import cn.xjzn.framework_Core.ModuleServe;
import cn.xjzn.framework_Core.StaticControl;
import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;
import java.util.List;

public class EqsRepairRequistion extends DataEntity<String> implements ObjectMark {

    @TableField(value = "code")
    @Excel(name = "报修编号", orderNum = "0", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "code",codeConfig = "RPRAUTOCODE",labelText = "报修编号", displayPosition = 1,isReadOnly = true,isSupportNewEdit = false,isSupportModify = false)
    private String code;
    @TableField(value = "organizationId")
    @Excel(name = "机构id", orderNum = "1", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "id", aliasName = "organizationId", labelText = "机构id", ownerPropertyName = "organization", isReference = 1, referenceModuleId = ModuleServe.organizationModule, displayPosition = 2, canDisplay = false,isDisplayAsSearchResult = false)
    private String organizationId;
    @TableField(value = "requesterId")
    @Excel(name = "报修人id", orderNum = "2", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "id", aliasName = "requesterId", labelText = "报修人id", ownerPropertyName = "user", isReference = 1, referenceModuleId = ModuleServe.personModule, displayPosition = 3, canDisplay = false,isDisplayAsSearchResult = false)
    private String requesterId;
    @TableField(value = "requestTime")
    @Excel(name = "报修时间", orderNum = "3", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "requestTime", labelText = "报修时间", staticControl = StaticControl.DATESTATICCONTROL, displayPosition = 4,dataType = DataType.TIMESTAMPDATATYPE)
    private Date requestTime;
    @TableField(value = "status")
    @Excel(name = "报修单状态", orderNum = "4", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "status", labelText = "报修单状态", controlType = ControlType.DICTSELECTCONTROL, dictCode = "orderStatus", displayPosition = 5)
    private String status;
    @TableField(value = "equipmentId")
    @Excel(name = "设备id", orderNum = "5", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "id", aliasName = "equipmentId", labelText = "设备id", ownerPropertyName = "eqsEquipment", isReference = 1, referenceModuleId = ModuleServe.equipmentModule, displayPosition = 6, canDisplay = false,isDisplayAsSearchResult = false)
    private String equipmentId;
    @TableField(value = "quantity")
    @Excel(name = "数量", orderNum = "6", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "quantity", labelText = "数量", staticControl = StaticControl.INTEGERSTATICCONTROL, displayPosition = 7)
    private Integer quantity;
    @TableField(value = "repairLevel")
    @Excel(name = "报修级别", orderNum = "7", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "repairLevel", labelText = "报修级别", controlType = ControlType.DICTSELECTCONTROL, dictCode = "repairLevel", displayPosition = 8)
    private String repairLevel;
    @TableField(value = "repairId")
    @Excel(name = "维修单id", orderNum = "8", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule, propertyName = "repairId", labelText = "维修单id", displayPosition = 9, canDisplay = false,isDisplayAsSearchResult = false)
    private String repairId;

    @TableField(exist = false)
    @UiPropertyField(moduleId = ModuleServe.eqsRepairRequistionModule,propertyName = "eqsRepairRequisitionitemList",ownerPropertyName = "eqsRepairRequisitionitemList",labelText="故障描述",dataType = DataType.SUBLISTDATATYPE,relationIdName = "requisitionId")
    private List<EqsRepairRequisitionitem> eqsRepairRequisitionitemList;
    @TableField(exist = false)
    private Organization organization;

    @TableField(exist = false)
    private User user;

    @TableField(exist = false)
    private EqsEquipment eqsEquipment;




    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }


    public String getRequesterId() {
        return requesterId;
    }

    public void setRequesterId(String requesterId) {
        this.requesterId = requesterId;
    }


    public Date getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(Date requestTime) {
        this.requestTime = requestTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }


    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }


    public String getRepairLevel() {
        return repairLevel;
    }

    public void setRepairLevel(String repairLevel) {
        this.repairLevel = repairLevel;
    }


    public String getRepairId() {
        return repairId;
    }

    public void setRepairId(String repairId) {
        this.repairId = repairId;
    }

    public Organization getOrganization() {
        return organization;
    }

    public void setOrganization(Organization organization) {
        this.organization = organization;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public EqsEquipment getEqsEquipment() {
        return eqsEquipment;
    }

    public void setEqsEquipment(EqsEquipment eqsEquipment) {
        this.eqsEquipment = eqsEquipment;
    }

    public List<EqsRepairRequisitionitem> getEqsRepairRequisitionitemList() {
        return eqsRepairRequisitionitemList;
    }

    public void setEqsRepairRequisitionitemList(List<EqsRepairRequisitionitem> eqsRepairRequisitionitemList) {
        this.eqsRepairRequisitionitemList = eqsRepairRequisitionitemList;
    }
}
